Search Help Files



You searched for alias variables


1. alias variables
Alias variables are supported.  This allows for creating your own syntax
arrangements for any given command.  One command that has a rather
cumbersome syntax is the db command, for example, due to its many different
search variations.

Say you are in search of a level 5 to 10 weapon.  The syntax without an
alias would be 'db 5‑10 slot wield'.  We could create an alias to simplify
that.  

Example: alias dbsearch db $1‑$2 slot $3

There are 3 wildcards, $1, $2, and $3, requiring 3 arguments from the user. 
Typing 'dbsearch 5 10 wield' would take $1 and replace it with 5, $2 with
10, and $3 with wield, so essentially it would substitute the string with
'db 5‑10 slot wield'.  

It is possible to use a wildcard variable multiple times, such as 'db $1‑$1
slot $2'.  If you typed 'dbsearch 5 wield', it would essentially replace
both $1 variables with 5, and $2 with wield.  

If you put multiple words in single quotes, it will be treated as one
argument.  
 
The $* variable will grab everything after the alias name entered.
 
Example: alias testme say 1:[$1] 2:[$2] 3:[$*]

You type: testme hi bye

This shows: You say, '1:hi 2:bye 3:hi bye'
 
If you want to eliminate usage of single quotes where possible, an example
of that would be an alias like: alias bag put '$*' bag.
 
Typing 'bag green hat' would put an item with keywords 'green hat' into bag.